|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cnrg.itx.datax.devices.MicrophoneSource
This class encapsulates the workings of the Microphone. It uses the jaudio subsystem to talk to hardware. Therefore, jaudio.dll must be in your path. .... Talk about usage..
| Field Summary | |
private boolean |
bAlive
|
private boolean |
bMute
|
private byte[] |
bSilence
|
private int |
bytesWritten
Attribute for storing the number of bytes written by this source. |
private Channel |
c
|
private int |
iDevice
|
private JAudioBlock[] |
jabBlocks
|
private JAudioDevice |
jad
|
private Stats |
microphoneStats
|
private static int |
QUEUE_SIZE
JAudioBlock queue size |
static int |
SAMPLE_BITS
|
static int |
SAMPLE_RATE
Audio properties (8kHz @ 8 bits / sample) |
static int |
SAMPLE_SIZE
Sample size (just use the Channel sample size, although this isn't required) |
static byte |
SILENCE
|
private java.lang.Thread |
thread
|
| Constructor Summary | |
MicrophoneSource(Channel c)
Creates the microphone. |
|
| Method Summary | |
void |
close()
stops playout. |
PropertiesCollection |
getProperties()
Returns a collection of properties supported. |
Stats |
getStatistics()
Method to get the statistics of the microphone device. |
boolean |
mute(boolean mute)
Mutes the playout. |
void |
run()
Method to run the thread. |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the given properties collection into the device (local); |
void |
start()
Method to start the thread of the source |
void |
stop()
Method to stop the thread. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int SAMPLE_RATE
public static final int SAMPLE_BITS
public static final byte SILENCE
public static final int SAMPLE_SIZE
private static final int QUEUE_SIZE
private JAudioDevice jad
private JAudioBlock[] jabBlocks
private boolean bAlive
private boolean bMute
private byte[] bSilence
private java.lang.Thread thread
private int bytesWritten
private Channel c
private int iDevice
private Stats microphoneStats
| Constructor Detail |
public MicrophoneSource(Channel c)
throws DataException
| Method Detail |
public void start()
public void stop()
public void run()
public void close()
public boolean mute(boolean mute)
mute - The new state.public Stats getStatistics()
public PropertiesCollection getProperties()
throws DataException
public void setProperties(PropertiesCollection pc)
throws DataException
public void setPeerProperties(PropertiesCollection pc)
throws DataException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||